<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>Nordic Thingy:52 v2.2.0 : Thingy Motion Service</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet_offline.css" rel="stylesheet" type="text/css"/>
<link href="nordic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%" class="blank">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Nordic Semiconductor" src="nordic_small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nordic Thingy:52 v2.2.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
<script>
var url=window.location.href.split("/").reverse()[1];
var validLinks= ["nrf5","s130","s132","s212","s332"];
var index;
for (index = 0; index < validLinks.length; ++index) {
   if ( url.indexOf(validLinks[index]) !== -1 ) {
      document.getElementById(validLinks[index]).setAttribute('class', 'doclinks docselected');
   };
};
</script>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__ble__sdk__srv__wss.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Thingy Motion Service<div class="ingroups"><a class="el" href="group__ble__sdk__srv.html">BLE services</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Thingy Motion Service implementation.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__tms__init__t.html">ble_tms_init_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Motion Service initialization structure.  <a href="structble__tms__init__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__tms__s.html">ble_tms_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Motion Service structure.  <a href="structble__tms__s.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga1681df902e484d625d537bdc72970db3"><td class="memItemLeft" align="right" valign="top"><a id="ga1681df902e484d625d537bdc72970db3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#ga1681df902e484d625d537bdc72970db3">BLE_TMS_CONFIG_COMP_INT_MAX</a>&#160;&#160;&#160;1000</td></tr>
<tr class="memdesc:ga1681df902e484d625d537bdc72970db3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum compass compensation interval [ms]. <br /></td></tr>
<tr class="separator:ga1681df902e484d625d537bdc72970db3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4b22e0e456f0c6f7012eb013e086dc2c"><td class="memItemLeft" align="right" valign="top"><a id="ga4b22e0e456f0c6f7012eb013e086dc2c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#ga4b22e0e456f0c6f7012eb013e086dc2c">BLE_TMS_CONFIG_COMP_INT_MIN</a>&#160;&#160;&#160;100</td></tr>
<tr class="memdesc:ga4b22e0e456f0c6f7012eb013e086dc2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum compass compensation interval [ms]. <br /></td></tr>
<tr class="separator:ga4b22e0e456f0c6f7012eb013e086dc2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad5622fe5f4747bdf573871454c6c513a"><td class="memItemLeft" align="right" valign="top"><a id="gad5622fe5f4747bdf573871454c6c513a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gad5622fe5f4747bdf573871454c6c513a">BLE_TMS_CONFIG_MPUF_MAX</a>&#160;&#160;&#160;200</td></tr>
<tr class="memdesc:gad5622fe5f4747bdf573871454c6c513a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum motion processing frequency [Hz]. <br /></td></tr>
<tr class="separator:gad5622fe5f4747bdf573871454c6c513a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8e60e993959e76994d9b39ba0eb4d7d"><td class="memItemLeft" align="right" valign="top"><a id="gaa8e60e993959e76994d9b39ba0eb4d7d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gaa8e60e993959e76994d9b39ba0eb4d7d">BLE_TMS_CONFIG_MPUF_MIN</a>&#160;&#160;&#160;5</td></tr>
<tr class="memdesc:gaa8e60e993959e76994d9b39ba0eb4d7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum motion processing frequency [Hz]. (4 Hz minimum to mpu_set_sample_rate()) <br /></td></tr>
<tr class="separator:gaa8e60e993959e76994d9b39ba0eb4d7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaabc25bd657a10daafa3f409e4566e8da"><td class="memItemLeft" align="right" valign="top"><a id="gaabc25bd657a10daafa3f409e4566e8da"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gaabc25bd657a10daafa3f409e4566e8da">BLE_TMS_CONFIG_PEDO_INT_MAX</a>&#160;&#160;&#160;5000</td></tr>
<tr class="memdesc:gaabc25bd657a10daafa3f409e4566e8da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum pedometer interval [ms]. <br /></td></tr>
<tr class="separator:gaabc25bd657a10daafa3f409e4566e8da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac645948ba448882be3cf95fd0c395633"><td class="memItemLeft" align="right" valign="top"><a id="gac645948ba448882be3cf95fd0c395633"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gac645948ba448882be3cf95fd0c395633">BLE_TMS_CONFIG_PEDO_INT_MIN</a>&#160;&#160;&#160;100</td></tr>
<tr class="memdesc:gac645948ba448882be3cf95fd0c395633"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum pedometer interval [ms]. <br /></td></tr>
<tr class="separator:gac645948ba448882be3cf95fd0c395633"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7abbc39281970f70f3339e8c077798bc"><td class="memItemLeft" align="right" valign="top"><a id="ga7abbc39281970f70f3339e8c077798bc"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#ga7abbc39281970f70f3339e8c077798bc">BLE_TMS_CONFIG_TEMP_INT_MAX</a>&#160;&#160;&#160;5000</td></tr>
<tr class="memdesc:ga7abbc39281970f70f3339e8c077798bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum temperature compensation interval [ms]. <br /></td></tr>
<tr class="separator:ga7abbc39281970f70f3339e8c077798bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac5af59176dc4c23c22ef77201ed1b164"><td class="memItemLeft" align="right" valign="top"><a id="gac5af59176dc4c23c22ef77201ed1b164"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gac5af59176dc4c23c22ef77201ed1b164">BLE_TMS_CONFIG_TEMP_INT_MIN</a>&#160;&#160;&#160;100</td></tr>
<tr class="memdesc:gac5af59176dc4c23c22ef77201ed1b164"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum temperature compensation interval [ms]. <br /></td></tr>
<tr class="separator:gac5af59176dc4c23c22ef77201ed1b164"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabc7001a5150027f6af452f450b55a102"><td class="memItemLeft" align="right" valign="top"><a id="gabc7001a5150027f6af452f450b55a102"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gabc7001a5150027f6af452f450b55a102">BLE_TMS_CONFIG_WOM_MAX</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:gabc7001a5150027f6af452f450b55a102"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wake on motion off. <br /></td></tr>
<tr class="separator:gabc7001a5150027f6af452f450b55a102"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa03bf3f8d91248dbd8a5c55d601d33f4"><td class="memItemLeft" align="right" valign="top"><a id="gaa03bf3f8d91248dbd8a5c55d601d33f4"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gaa03bf3f8d91248dbd8a5c55d601d33f4">BLE_TMS_CONFIG_WOM_MIN</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:gaa03bf3f8d91248dbd8a5c55d601d33f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wake on motion on. <br /></td></tr>
<tr class="separator:gaa03bf3f8d91248dbd8a5c55d601d33f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0367b57be0b83671daf133bb08724b76"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#ga0367b57be0b83671daf133bb08724b76">BLE_TMS_MAX_DATA_LEN</a>&#160;&#160;&#160;(BLE_GATT_ATT_MTU_DEFAULT - 3)</td></tr>
<tr class="separator:ga0367b57be0b83671daf133bb08724b76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8f8738c7d72fd985de9af68f4356b273"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#ga8f8738c7d72fd985de9af68f4356b273">BLE_UUID_TMS_SERVICE</a>&#160;&#160;&#160;0x0400</td></tr>
<tr class="separator:ga8f8738c7d72fd985de9af68f4356b273"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga4f1f7a4fdc4aac9416405bf433d043e0"><td class="memItemLeft" align="right" valign="top"><a id="ga4f1f7a4fdc4aac9416405bf433d043e0"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#ga4f1f7a4fdc4aac9416405bf433d043e0">ble_tms_evt_handler_t</a>) (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_tms, ble_tms_evt_type_t evt_type, uint8_t *p_data, uint16_t length)</td></tr>
<tr class="memdesc:ga4f1f7a4fdc4aac9416405bf433d043e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Motion Service event handler type. <br /></td></tr>
<tr class="separator:ga4f1f7a4fdc4aac9416405bf433d043e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gae144dcf1529ef6afe7a25bccf62506bf"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gae144dcf1529ef6afe7a25bccf62506bf">ble_tms_euler_set</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_tms, ble_tms_euler_t *p_data)</td></tr>
<tr class="memdesc:gae144dcf1529ef6afe7a25bccf62506bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for sending euler angle data.  <a href="#gae144dcf1529ef6afe7a25bccf62506bf">More...</a><br /></td></tr>
<tr class="separator:gae144dcf1529ef6afe7a25bccf62506bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaee53ea24ac784f958db56d334763a306"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gaee53ea24ac784f958db56d334763a306">ble_tms_gravity_set</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_tms, ble_tms_gravity_t *p_data)</td></tr>
<tr class="memdesc:gaee53ea24ac784f958db56d334763a306"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for sending gravity vector data.  <a href="#gaee53ea24ac784f958db56d334763a306">More...</a><br /></td></tr>
<tr class="separator:gaee53ea24ac784f958db56d334763a306"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad8a6720b9f28cb13237ac0d5379a7ef0"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gad8a6720b9f28cb13237ac0d5379a7ef0">ble_tms_heading_set</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_tms, ble_tms_heading_t *p_data)</td></tr>
<tr class="memdesc:gad8a6720b9f28cb13237ac0d5379a7ef0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for sending compass heading data.  <a href="#gad8a6720b9f28cb13237ac0d5379a7ef0">More...</a><br /></td></tr>
<tr class="separator:gad8a6720b9f28cb13237ac0d5379a7ef0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaac5bc26cb9a4927d0e774fc22c8fe3ab"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gaac5bc26cb9a4927d0e774fc22c8fe3ab">ble_tms_init</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_wss, const <a class="el" href="structble__tms__init__t.html">ble_tms_init_t</a> *p_tms_init)</td></tr>
<tr class="memdesc:gaac5bc26cb9a4927d0e774fc22c8fe3ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for initializing the Motion Service.  <a href="#gaac5bc26cb9a4927d0e774fc22c8fe3ab">More...</a><br /></td></tr>
<tr class="separator:gaac5bc26cb9a4927d0e774fc22c8fe3ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga619888103f7c089c7622cb841bc1f152"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#ga619888103f7c089c7622cb841bc1f152">ble_tms_on_ble_evt</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_wss, ble_evt_t *p_ble_evt)</td></tr>
<tr class="memdesc:ga619888103f7c089c7622cb841bc1f152"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for handling the Motion Service's BLE events.  <a href="#ga619888103f7c089c7622cb841bc1f152">More...</a><br /></td></tr>
<tr class="separator:ga619888103f7c089c7622cb841bc1f152"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1882d22b71460844a49ef232b3b429a9"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#ga1882d22b71460844a49ef232b3b429a9">ble_tms_orientation_set</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_tms, ble_tms_orientation_t *p_data)</td></tr>
<tr class="memdesc:ga1882d22b71460844a49ef232b3b429a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for sending orientation data.  <a href="#ga1882d22b71460844a49ef232b3b429a9">More...</a><br /></td></tr>
<tr class="separator:ga1882d22b71460844a49ef232b3b429a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga69135fb15c189f352d3bf60fdd786102"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#ga69135fb15c189f352d3bf60fdd786102">ble_tms_pedo_set</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_tms, ble_tms_pedo_t *p_data)</td></tr>
<tr class="memdesc:ga69135fb15c189f352d3bf60fdd786102"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for sending pedometer data.  <a href="#ga69135fb15c189f352d3bf60fdd786102">More...</a><br /></td></tr>
<tr class="separator:ga69135fb15c189f352d3bf60fdd786102"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga430db44a4ab326a0fa74968b46c086f8"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#ga430db44a4ab326a0fa74968b46c086f8">ble_tms_quat_set</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_tms, ble_tms_quat_t *p_data)</td></tr>
<tr class="memdesc:ga430db44a4ab326a0fa74968b46c086f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for sending quaternion data.  <a href="#ga430db44a4ab326a0fa74968b46c086f8">More...</a><br /></td></tr>
<tr class="separator:ga430db44a4ab326a0fa74968b46c086f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae724422f00957f8a17c6e179f56a16c0"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gae724422f00957f8a17c6e179f56a16c0">ble_tms_raw_set</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_tms, ble_tms_raw_t *p_data)</td></tr>
<tr class="memdesc:gae724422f00957f8a17c6e179f56a16c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for sending raw data.  <a href="#gae724422f00957f8a17c6e179f56a16c0">More...</a><br /></td></tr>
<tr class="separator:gae724422f00957f8a17c6e179f56a16c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadc3e8340c810646804ecbb7980c4456d"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gadc3e8340c810646804ecbb7980c4456d">ble_tms_rot_mat_set</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_tms, ble_tms_rot_mat_t *p_data)</td></tr>
<tr class="memdesc:gadc3e8340c810646804ecbb7980c4456d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for sending rotation matrix data.  <a href="#gadc3e8340c810646804ecbb7980c4456d">More...</a><br /></td></tr>
<tr class="separator:gadc3e8340c810646804ecbb7980c4456d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabc6b82dd6f4daad7774379fcabef416c"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__wss.html#gabc6b82dd6f4daad7774379fcabef416c">ble_tms_tap_set</a> (<a class="el" href="structble__tms__s.html">ble_tms_t</a> *p_tms, ble_tms_tap_t *p_data)</td></tr>
<tr class="memdesc:gabc6b82dd6f4daad7774379fcabef416c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for sending tap data.  <a href="#gabc6b82dd6f4daad7774379fcabef416c">More...</a><br /></td></tr>
<tr class="separator:gabc6b82dd6f4daad7774379fcabef416c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Thingy Motion Service implementation. </p>
<p>The Motion Service is a simple GATT-based service with TX and RX characteristics. Data received from the peer is passed to the application, and the data received from the application of this service is sent to the peer as Handle Value Notifications. This module demonstrates how to implement a custom GATT-based service and characteristics using the S110 SoftDevice. The service is used by the application to send and receive ASCII text strings to and from the peer.</p>
<dl class="section note"><dt>Note</dt><dd>The application must propagate S110 SoftDevice events to the Motion Service module by calling the <a class="el" href="group__ble__sdk__srv__wss.html#ga619888103f7c089c7622cb841bc1f152" title="Function for handling the Motion Service&#39;s BLE events. ">ble_tms_on_ble_evt()</a> function from the ble_stack_handler callback. </dd></dl>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga0367b57be0b83671daf133bb08724b76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0367b57be0b83671daf133bb08724b76">&#9670;&nbsp;</a></span>BLE_TMS_MAX_DATA_LEN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BLE_TMS_MAX_DATA_LEN&#160;&#160;&#160;(BLE_GATT_ATT_MTU_DEFAULT - 3)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Maximum length of data (in bytes) that can be transmitted to the peer by the Motion service module. </p>

</div>
</div>
<a id="ga8f8738c7d72fd985de9af68f4356b273"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8f8738c7d72fd985de9af68f4356b273">&#9670;&nbsp;</a></span>BLE_UUID_TMS_SERVICE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BLE_UUID_TMS_SERVICE&#160;&#160;&#160;0x0400</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The UUID of the Motion Service. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gae144dcf1529ef6afe7a25bccf62506bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae144dcf1529ef6afe7a25bccf62506bf">&#9670;&nbsp;</a></span>ble_tms_euler_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tms_euler_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_tms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tms_euler_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for sending euler angle data. </p>
<p>This function sends the input pitch, roll and yaw as an euler characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tms</td><td>Pointer to the Motion Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaee53ea24ac784f958db56d334763a306"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaee53ea24ac784f958db56d334763a306">&#9670;&nbsp;</a></span>ble_tms_gravity_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tms_gravity_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_tms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tms_gravity_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for sending gravity vector data. </p>
<p>This function sends the input as a gravity vector characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tms</td><td>Pointer to the Motion Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gad8a6720b9f28cb13237ac0d5379a7ef0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad8a6720b9f28cb13237ac0d5379a7ef0">&#9670;&nbsp;</a></span>ble_tms_heading_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tms_heading_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_tms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tms_heading_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for sending compass heading data. </p>
<p>This function sends the input as a compass heading characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tms</td><td>Pointer to the Motion Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaac5bc26cb9a4927d0e774fc22c8fe3ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaac5bc26cb9a4927d0e774fc22c8fe3ab">&#9670;&nbsp;</a></span>ble_tms_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tms_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_wss</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structble__tms__init__t.html">ble_tms_init_t</a> *&#160;</td>
          <td class="paramname"><em>p_tms_init</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for initializing the Motion Service. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">p_wss</td><td>Motion Service structure. This structure must be supplied by the application. It is initialized by this function and will later be used to identify this particular service instance. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tms_init</td><td>Information needed to initialize the service.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the service was successfully initialized. Otherwise, an error code is returned. </td></tr>
    <tr><td class="paramname">NRF_ERROR_NULL</td><td>If either of the pointers p_wss or p_tms_init is NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga619888103f7c089c7622cb841bc1f152"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga619888103f7c089c7622cb841bc1f152">&#9670;&nbsp;</a></span>ble_tms_on_ble_evt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ble_tms_on_ble_evt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_wss</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_evt_t *&#160;</td>
          <td class="paramname"><em>p_ble_evt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for handling the Motion Service's BLE events. </p>
<p>The Motion Service expects the application to call this function each time an event is received from the S110 SoftDevice. This function processes the event if it is relevant and calls the Motion Service event handler of the application if necessary.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_wss</td><td>Motion Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ble_evt</td><td>Event received from the S110 SoftDevice. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1882d22b71460844a49ef232b3b429a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1882d22b71460844a49ef232b3b429a9">&#9670;&nbsp;</a></span>ble_tms_orientation_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tms_orientation_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_tms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tms_orientation_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for sending orientation data. </p>
<p>This function sends the input orientation as an orientation characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tms</td><td>Pointer to the Motion Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the orientation data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga69135fb15c189f352d3bf60fdd786102"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga69135fb15c189f352d3bf60fdd786102">&#9670;&nbsp;</a></span>ble_tms_pedo_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tms_pedo_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_tms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tms_pedo_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for sending pedometer data. </p>
<p>This function sends the input steps and time as an pedometer characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tms</td><td>Pointer to the Motion Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga430db44a4ab326a0fa74968b46c086f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga430db44a4ab326a0fa74968b46c086f8">&#9670;&nbsp;</a></span>ble_tms_quat_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tms_quat_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_tms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tms_quat_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for sending quaternion data. </p>
<p>This function sends the input quaternion as an quaternion characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tms</td><td>Pointer to the Motion Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the quaternion data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gae724422f00957f8a17c6e179f56a16c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae724422f00957f8a17c6e179f56a16c0">&#9670;&nbsp;</a></span>ble_tms_raw_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tms_raw_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_tms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tms_raw_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for sending raw data. </p>
<p>This function sends the input as an raw characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tms</td><td>Pointer to the Motion Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gadc3e8340c810646804ecbb7980c4456d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadc3e8340c810646804ecbb7980c4456d">&#9670;&nbsp;</a></span>ble_tms_rot_mat_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tms_rot_mat_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_tms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tms_rot_mat_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for sending rotation matrix data. </p>
<p>This function sends the input as a rotation matrix characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tms</td><td>Pointer to the Motion Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gabc6b82dd6f4daad7774379fcabef416c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabc6b82dd6f4daad7774379fcabef416c">&#9670;&nbsp;</a></span>ble_tms_tap_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ble_tms_tap_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__tms__s.html">ble_tms_t</a> *&#160;</td>
          <td class="paramname"><em>p_tms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ble_tms_tap_t *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for sending tap data. </p>
<p>This function sends the input tap as an tap characteristic notification to the peer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_tms</td><td>Pointer to the Motion Service structure. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>Pointer to the tap data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">NRF_SUCCESS</td><td>If the string was sent successfully. Otherwise, an error code is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="topicfooter">
<a href="mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback" id="maillink">Documentation feedback</a> | <a href="https://devzone.nordicsemi.com/questions/" target="_blank">Developer Zone</a> | <a href="http://response.nordicsemi.com/subscribe-to-our-newsletters" target="_blank">Subscribe</a> | Updated <span id="date"/>
<script>
var date = new Date("Thu Feb 7 2019" + " UTC");
document.getElementById("date").innerHTML = date.toJSON().slice(0, 10);
var url=window.location.href.split("?")[0];
var filename=url.substring(url.lastIndexOf('/')+1);
document.getElementById("maillink").href = "mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback"+decodeURIComponent("%26")+"body=File%20name%3A%20"+encodeURIComponent(filename);
</script>
</div>
</body>
</html>
